import 'dart:math';
import 'package:dio/dio.dart';
import 'package:wallpaper_app/http/dio_instance.dart';

Future<Response> mohuImgsApi({required String id, int num = 50}) =>
    DioInstance.instance().get(path: 'https://img.moehu.org/pic.php', param: {
      'id': id,
      'return': 'json',
      'size': 'mw690',
      'num': num,
      'radom': Random().nextDouble(),
    });


// 堆糖搜图
Future<Response> getDtImgs({required String keyword, required int page}) =>
    DioInstance.instance()
        .get(path: 'https://api.yuafeng.cn/API/ly/duitang.php', param: {
      'msg': keyword,
      'page': page,
    });

//毒霸视频壁纸搜索 type：android/pc,安卓和pc端，默认android(安卓)
Future<Response> getDuBaVideoWallpaper(
        {required int page, required int limit, String msg = '二次元'}) =>
    DioInstance.instance().get(
      path: 'https://api.cenguigui.cn/api/wallpaper/api.php',
      param: {
        'page': page,
        'limit': limit,
        'msg': msg,
      },
    );

